package org.xxpay.core.entity;

import java.io.Serializable;
import java.util.Date;

public class PayDomain implements Serializable {
    /**
     * 域名ID
     *
     * @mbggenerated
     */
    private Integer id;

    /**
     * 域名地址
     *
     * @mbggenerated
     */
    private String domainUrl;

    /**
     * 风控状态:0 未风控 1 已风控
     *
     * @mbggenerated
     */
    private Byte riskStatus;

    /**
     * 域名状态:0 停止 1 启用
     *
     * @mbggenerated
     */
    private Byte domainStatus;

    /**
     * 域名类型:1-仅打开支付宝,2-仅获取支付宝UserId,3-都支持
     *
     * @mbg.generated
     */
    private Byte domainType;

    /**
     * 应用ID
     *
     * @mbg.generated
     */
    private String appId;

    /**
     * 应用私钥
     *
     * @mbg.generated
     */
    private String appPrivateKey;

    /**
     * 支付宝公钥
     *
     * @mbg.generated
     */
    private String alipayPublicKey;

    /**
     * 商户ID,多个逗号分隔
     *
     * @mbg.generated
     */
    private String mchId;

    /**
     * 创建时间
     *
     * @mbggenerated
     */
    private Date createTime;

    /**
     * 更新时间
     *
     * @mbg.generated
     */
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDomainUrl() {
        return domainUrl;
    }

    public void setDomainUrl(String domainUrl) {
        this.domainUrl = domainUrl;
    }

    public Byte getRiskStatus() {
        return riskStatus;
    }

    public void setRiskStatus(Byte riskStatus) {
        this.riskStatus = riskStatus;
    }

    public Byte getDomainStatus() {
        return domainStatus;
    }

    public void setDomainStatus(Byte domainStatus) {
        this.domainStatus = domainStatus;
    }

    public Byte getDomainType() {
        return domainType;
    }

    public void setDomainType(Byte domainType) {
        this.domainType = domainType;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAppPrivateKey() {
        return appPrivateKey;
    }

    public void setAppPrivateKey(String appPrivateKey) {
        this.appPrivateKey = appPrivateKey;
    }

    public String getAlipayPublicKey() {
        return alipayPublicKey;
    }

    public void setAlipayPublicKey(String alipayPublicKey) {
        this.alipayPublicKey = alipayPublicKey;
    }

    public String getMchId() {
        return mchId;
    }

    public void setMchId(String mchId) {
        this.mchId = mchId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", domainUrl=").append(domainUrl);
        sb.append(", riskStatus=").append(riskStatus);
        sb.append(", domainStatus=").append(domainStatus);
        sb.append(", domainType=").append(domainType);
        sb.append(", appId=").append(appId);
        sb.append(", appPrivateKey=").append(appPrivateKey);
        sb.append(", alipayPublicKey=").append(alipayPublicKey);
        sb.append(", mchId=").append(mchId);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PayDomain other = (PayDomain) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDomainUrl() == null ? other.getDomainUrl() == null : this.getDomainUrl().equals(other.getDomainUrl()))
            && (this.getRiskStatus() == null ? other.getRiskStatus() == null : this.getRiskStatus().equals(other.getRiskStatus()))
            && (this.getDomainStatus() == null ? other.getDomainStatus() == null : this.getDomainStatus().equals(other.getDomainStatus()))
            && (this.getDomainType() == null ? other.getDomainType() == null : this.getDomainType().equals(other.getDomainType()))
            && (this.getAppId() == null ? other.getAppId() == null : this.getAppId().equals(other.getAppId()))
            && (this.getAppPrivateKey() == null ? other.getAppPrivateKey() == null : this.getAppPrivateKey().equals(other.getAppPrivateKey()))
            && (this.getAlipayPublicKey() == null ? other.getAlipayPublicKey() == null : this.getAlipayPublicKey().equals(other.getAlipayPublicKey()))
            && (this.getMchId() == null ? other.getMchId() == null : this.getMchId().equals(other.getMchId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDomainUrl() == null) ? 0 : getDomainUrl().hashCode());
        result = prime * result + ((getRiskStatus() == null) ? 0 : getRiskStatus().hashCode());
        result = prime * result + ((getDomainStatus() == null) ? 0 : getDomainStatus().hashCode());
        result = prime * result + ((getDomainType() == null) ? 0 : getDomainType().hashCode());
        result = prime * result + ((getAppId() == null) ? 0 : getAppId().hashCode());
        result = prime * result + ((getAppPrivateKey() == null) ? 0 : getAppPrivateKey().hashCode());
        result = prime * result + ((getAlipayPublicKey() == null) ? 0 : getAlipayPublicKey().hashCode());
        result = prime * result + ((getMchId() == null) ? 0 : getMchId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }
}